using System.ComponentModel.DataAnnotations;

namespace AiPlatformAdmin.Api.Models;

public class Document
{
    public int Id { get; set; }

    [Required]
    public int KnowledgeBaseId { get; set; }
    public KnowledgeBase KnowledgeBase { get; set; } = null!;

    [Required]
    [MaxLength(500)]
    public string FileName { get; set; } = string.Empty;

    [Required]
    [MaxLength(1000)]
    public string FilePath { get; set; } = string.Empty;

    public long FileSize { get; set; }

    [MaxLength(100)]
    public string? FileType { get; set; }

    [MaxLength(50)]
    public string ChunkingMode { get; set; } = "fixed"; // fixed, semantic, paragraph, none

    public int? ChunkSize { get; set; } // For fixed chunking mode

    public int? ChunkOverlap { get; set; } // For fixed chunking mode

    public DateTime UploadedAt { get; set; } = DateTime.UtcNow;

    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
